package com.example.service;

import com.example.entity.Organization;
import org.apache.ibatis.annotations.Param;
import javax.servlet.http.HttpSession;
import java.util.List;

public interface OrganizationService {
    List<Organization> getAllOrganizations();
    Organization getOrganizationByOrgid(Integer orgid);
    boolean addOrganization(Organization organization);
    boolean updateOrganization(Organization organization);
    boolean deleteOrganization(Integer orgid);
    List<Organization> searchOrganizations(@Param("org_name") String org_name, @Param("org_type") String org_type);
  /**
     * 获取当前登录机构
     */
    Organizations getCurrentOrganization();

    /**
     * 获取机构志愿者数量
     */
    int getVolunteerCount(int orgId);

    /**
     * 根据用户名获取机构
     */
    Organizations findByUsername(String username);

    Organizations getCurrentOrganization(HttpSession session);

    Organizations getOrganizationByUserId(int userId);

    void updateOrganization(Organizations org);
    boolean existsById(int orgId);
}
}